<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>属性选择器</title>
        <style>
            div[class] {
                width: 200px;
                height: 35px;
                background: blue;
            }

            [class=b] {
                border: 2px solid yellow;
            }

            [class~=c] {
                background: orange;
            }


        </style>
    </head>
    <body>
        <div class="a">hello</div>
        <p class="b c">world</p>
        <p>how are you</p>
    </body>
</html>